# encoding: utf-8
""" 
@version: v1.0 
@author: autumner 
@license: Apache Licence  
@contact: 18322313385@163.com 
@site:  https://gitee.com/autumner/pythoncookbook
@software: PyCharm 
@file: net_requests_getHeader.py 
@time: 2019/7/10 下午1:38
"""
'''
通过requests获取web的头信息
'''
import requests

# 设置URL
url = 'https://mail.163.com'

# 获取头部信息
resp = requests.head(url)

print('status:', resp.status_code)
print(resp.headers)
# print(resp.headers['uuid'])